# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kdesignerplugin5
pkgver=5.113.0
pkgrel=0
pkgdesc="Integration of Frameworks widgets in Qt Designer/Creator"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only"
depends_dev="$pkgname=$pkgver-r$pkgrel
	kcompletion5-dev
	kconfig5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kiconthemes5-dev
	kio5-dev
	kitemviews5-dev
	kplotting5-dev
	ktextwidgets5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	sonnet5-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	kdoctools5-dev
	qt5-qttools-dev
	samurai
	"
checkdepends="xvfb-run"
_repo_url="https://invent.kde.org/frameworks/kdesignerplugin.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/kdesignerplugin-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
builddir="$srcdir/kdesignerplugin-$pkgver"

replaces="kdesignerplugin<=5.110.0-r0"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
aa341c6d17416e0ddb0476f2af343f602468494d8bcc2131c96da4d1e5052ae95e2f77b751092c2b578a0c14aa3bc247369a086f161e35d13671023354ed10b0  kdesignerplugin-5.113.0.tar.xz
"
